package com.icode.chat.message.decorator;

import com.icode.chat.message.ChatMessage;
import com.icode.chat.message.Message;

/**
 * Created with IntelliJ IDEA.
 * User: ZhongGang
 * Date: 14-8-2
 * Time: 下午8:16
 */
public class DecoratedChatMessage implements Message {
    private ChatMessage message;

    public DecoratedChatMessage(ChatMessage message) {
        this.message = message;
    }

    public String getChatter() {
        return "<span class='label label-success' style='margin-right:15px'>" + message.getChatter() + " " + message.getChatTime() + "</span>";
    }

    public String getContent() {
        return message.getContent();
    }

    public String getChatTime() {
        return "<span class='label' style='margin-right:15px'>" + message.getChatTime() + "</span>";
    }

    @Override
    public MessageType getMessageType() {
        return MessageType.CHAT;
    }
}
